package com.mxue.test;

import java.util.Arrays;
import java.util.List;
import java.util.Stack;

public class StaticDemo {
    public static void main(String[] args) {
        List<Integer> a = Arrays.asList(1, 2, 3, 4, 5);
        System.out.println(a);
        Stack<Integer> stack = new Stack<>();
        for (Integer i : a) {
            stack.push(i);
        }

        for (int i = 0; i < stack.size(); i++) {
            System.out.println( stack.peek());
        }
    }
}
